home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Retrace.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  4.4 KB  |  159 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Retrace.h
  3.  
  4.      Contains:    Vertical Retrace Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1985-1993, 1995-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __RETRACE__
  18. #define __RETRACE__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __OSUTILS__
  25.     #include <OSUtils.h>
  26. #endif
  27.  
  28.  
  29.  
  30.  
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_IMPORT
  40. #pragma import on
  41. #endif
  42.  
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50.  
  51. typedef struct VBLTask                     VBLTask;
  52. typedef VBLTask *                        VBLTaskPtr;
  53. typedef CALLBACK_API( void , VBLProcPtr )(VBLTaskPtr vblTaskPtr);
  54. /*
  55.     WARNING: VBLProcPtr uses register based parameters under classic 68k
  56.              and cannot be written in a high-level language without 
  57.              the help of mixed mode or assembly glue.
  58. */
  59. typedef REGISTER_UPP_TYPE(VBLProcPtr)                             VBLUPP;
  60.  
  61. struct VBLTask {
  62.     QElemPtr                         qLink;
  63.     short                             qType;
  64.     VBLUPP                             vblAddr;
  65.     short                             vblCount;
  66.     short                             vblPhase;
  67. };
  68.  
  69. #if OPAQUE_UPP_TYPES
  70.     EXTERN_API(VBLUPP)
  71.     NewVBLUPP                       (VBLProcPtr                userRoutine);
  72.  
  73.     EXTERN_API(void)
  74.     DisposeVBLUPP                   (VBLUPP                    userUPP);
  75.  
  76.     EXTERN_API(void)
  77.     InvokeVBLUPP                   (VBLTaskPtr                vblTaskPtr,
  78.                                     VBLUPP                    userUPP);
  79.  
  80. #else
  81.     enum { uppVBLProcInfo = 0x00009802 };                             /* register no_return_value Func(4_bytes:A0) */
  82.     #define NewVBLUPP(userRoutine)                                     (VBLUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppVBLProcInfo, GetCurrentArchitecture())
  83.     #define DisposeVBLUPP(userUPP)                                     DisposeRoutineDescriptor(userUPP)
  84.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  85.     #pragma parameter InvokeVBLUPP(__A0, __A1)
  86.     void InvokeVBLUPP(VBLTaskPtr vblTaskPtr, VBLUPP userUPP) = 0x4E91;
  87.     #else
  88.         #define InvokeVBLUPP(vblTaskPtr, userUPP)                         CALL_ONE_PARAMETER_UPP((userUPP), uppVBLProcInfo, (vblTaskPtr))
  89.     #endif
  90. #endif
  91. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  92. #define NewVBLProc(userRoutine)                                 NewVBLUPP(userRoutine)
  93. #define CallVBLProc(userRoutine, vblTaskPtr)                    InvokeVBLUPP(vblTaskPtr, userRoutine)
  94. #if CALL_NOT_IN_CARBON
  95. EXTERN_API( QHdrPtr )
  96. GetVBLQHdr                        (void)                                                        THREEWORDINLINE(0x2EBC, 0x0000, 0x0160);
  97.  
  98.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  99.                                                                                             #pragma parameter __D0 SlotVInstall(__A0, __D0)
  100.                                                                                             #endif
  101. EXTERN_API( OSErr )
  102. SlotVInstall                    (QElemPtr                 vblBlockPtr,
  103.                                  short                     theSlot)                            ONEWORDINLINE(0xA06F);
  104.  
  105.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  106.                                                                                             #pragma parameter __D0 SlotVRemove(__A0, __D0)
  107.                                                                                             #endif
  108. EXTERN_API( OSErr )
  109. SlotVRemove                        (QElemPtr                 vblBlockPtr,
  110.                                  short                     theSlot)                            ONEWORDINLINE(0xA070);
  111.  
  112.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  113.                                                                                             #pragma parameter __D0 AttachVBL(__D0)
  114.                                                                                             #endif
  115. EXTERN_API( OSErr )
  116. AttachVBL                        (short                     theSlot)                            ONEWORDINLINE(0xA071);
  117.  
  118.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  119.                                                                                             #pragma parameter __D0 DoVBLTask(__D0)
  120.                                                                                             #endif
  121. EXTERN_API( OSErr )
  122. DoVBLTask                        (short                     theSlot)                            ONEWORDINLINE(0xA072);
  123.  
  124.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  125.                                                                                             #pragma parameter __D0 VInstall(__A0)
  126.                                                                                             #endif
  127. EXTERN_API( OSErr )
  128. VInstall                        (QElemPtr                 vblTaskPtr)                            ONEWORDINLINE(0xA033);
  129.  
  130.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  131.                                                                                             #pragma parameter __D0 VRemove(__A0)
  132.                                                                                             #endif
  133. EXTERN_API( OSErr )
  134. VRemove                            (QElemPtr                 vblTaskPtr)                            ONEWORDINLINE(0xA034);
  135.  
  136. #endif  /* CALL_NOT_IN_CARBON */
  137.  
  138.  
  139. #if PRAGMA_STRUCT_ALIGN
  140.     #pragma options align=reset
  141. #elif PRAGMA_STRUCT_PACKPUSH
  142.     #pragma pack(pop)
  143. #elif PRAGMA_STRUCT_PACK
  144.     #pragma pack()
  145. #endif
  146.  
  147. #ifdef PRAGMA_IMPORT_OFF
  148. #pragma import off
  149. #elif PRAGMA_IMPORT
  150. #pragma import reset
  151. #endif
  152.  
  153. #ifdef __cplusplus
  154. }
  155. #endif
  156.  
  157. #endif /* __RETRACE__ */
  158.  
  159.